package com.yanghang.cloudproduct.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class ProductController {
    @Value("${server.port}")
    private String port;

    @GetMapping("/{id}")
    public String selectOne(@PathVariable("id") int id){
        return "我是商品服务，我接收的id是"+id+"       我接收的端口号是"+port;
    }

}
